package mx.com.matersys.vacs.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "bitacora_registros")
public class BitacoraRegistros {
	@Id
	@TableGenerator(name="GEN_BITA_REG", table="sequence", pkColumnName="SEQ_NAME", valueColumnName="SEQ_COUNT", pkColumnValue="SEQ_BITA_REG", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="GEN_BITA_REG")
    @Column(name = "idbitacora")
    private Integer idbitacora;
	
	@ManyToOne
    @JoinColumn(name = "idtiporegistro", referencedColumnName = "idregistro")
    private TipoRegistro idtiporegistro;
    
    @Column(name = "fecharegistro")
    @NotNull
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern="d/M/yy")
    private Date fecharegistro;
    
    @Column(name = "info", length = 300)
    private String info;
}
